gtktext: Set claimed state on button1 click gesture
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 23 Aug 2021 13:28:27 +0000 (15:28 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 23 Aug 2021 13:28:27 +0000 (15:28 +0200)
All possible ramifications after button1 press (move cursor,
begin drag, begin dnd, select word/line, ...) result in user
actions. The right thing after that is consuming the events,
set the gesture state for that.

gtk/gtktext.c

index 52cbf56a091c3ee8d1f4348a28a4fb86d5dc7eed..43d8c52d62cf6faa84704b4e3e2bc46902bc4a97 100644 (file)
@@ -2773,6 +2773,8 @@ gtk_text_click_gesture_pressed (GtkGestureClick *gesture,
       GdkDevice *source;
       guint state;
 
+      gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
+
       sel_start = priv->selection_bound;
       sel_end = priv->current_pos;
       have_selection = sel_start != sel_end;